package icu.qx.qc.controller;

import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.web.controller.BaseController;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.common.security.annotation.RequiresPermissions;
import com.ruoyi.system.api.domain.SysUser;
import icu.qx.qc.domain.QcProQuality;
import icu.qx.qc.domain.QcQualityProject;
import icu.qx.qc.service.IQcQualityQprojectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/qc/qcProject")
public class QcQualityQProjectController extends BaseController {
    @Autowired
    private IQcQualityQprojectService qcQualityQprojectService;

    /**
     * 获取质检项目明细
     */
    @GetMapping(value = "/{reportQcCode}")
    public AjaxResult getDetail(@PathVariable("reportQcCode") String qcCode) {
        List<QcQualityProject> qcQualityProjects = qcQualityQprojectService.selectQcQualityQprojectByQqProCheckCode(qcCode);
        return success(qcQualityProjects);
    }
}
